# Replication Package: The Demographic Regulatory Doom Loop

## Overview
This folder contains all files needed to replicate the analysis in "The Demographic Regulatory Doom Loop." The paper identifies a self-reinforcing loop between aging, pension obligations, fiscal deterioration, and sovereign risk, amplified by Basel III/Solvency II zero risk weights. Pension spending responds to OADR at 6:1 vs revenue; the pension×OADR interaction accelerates debt (p=0.04); the OADR×debt interaction marginally predicts rating deterioration (p=0.07). Japan, France, Italy, Finland, Belgium score highest on the composite doom loop index.

## Requirements
- Python 3.10+
- pandas, numpy, scipy, statsmodels
- Data files in data/processed/

## Structure
- `scripts/` — Analysis script (single consolidated script covers all phases)
- `src/` — Shared modules (PanelGLS estimator, data loading, country classifications)
- `data/processed/` — Processed panel data (doom_loop_panel.csv)
- `output/tables/` — Generated output tables
- `paper/` — Paper manuscript

## Reproduction
Run the consolidated analysis script:
```
python scripts/ff_all_phases.py
```

## Data Sources
- UN World Population Prospects 2024
- IMF World Economic Outlook
- OECD Social Expenditure Database (SOCX)
- S&P Sovereign Credit Ratings (historical)
- Penn World Table 10.01
- Lane & Milesi-Ferretti External Wealth of Nations

## Notes
- All analysis uses the 140-country expanded panel, restricted to 31 sovereign-rated issuers (1990-2024, 1,021 obs)
- The `src/` modules are shared with the multilateral project and contain the expanded country lists
- Single script (ff_all_phases.py) runs all phases sequentially
- Top 5 doom loop intensity: Japan (0.80), France (0.73), Italy (0.73), Finland (0.70), Belgium (0.66)
- 6 of top 10 are currently safe issuers (AA- or above)
